package com.spring.cloud.controller;

import com.spring.cloud.service.HelloSenderA;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloController {


    @Resource
    private HelloSenderA helloSenderA;


    @GetMapping("/hello/{name}")
    public String hello(@PathVariable String name){
        System.out.println(name+" welcome . My is microservice provider user");
        return name+" welcome . My is microservice provider user";
    }

    @GetMapping("/rabbit/hello")
    public void sendHello(){
        helloSenderA.send();
    }
}
